home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWStream / Include / FWMemSin.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  1.5 KB  |  52 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWMemSin.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWMEMSIN_H
  11. #define FWMEMSIN_H
  12.  
  13. #include "SLMemSin.xh"
  14.  
  15. #ifndef FWRANSIN_H
  16. #include "FWRanSin.h"
  17. #endif
  18.  
  19. //========================================================================================
  20. //    CLASS FW_PMemorySink
  21. //
  22. //        Inherited API for operator->()
  23. //            long GetReadableBytes();
  24. //            void Read(in void * destination, in long count);
  25. //            long GetWritableBytes();
  26. //            void Write(in void* source, in long count);
  27. //
  28. //            long GetLength();
  29. //            void SetLength(in long length);
  30. //            long GetPosition();
  31. //            void SetPosition(in long position);
  32. //
  33. //========================================================================================
  34.  
  35. class FW_PMemorySink : public FW_PRandomAccessSink
  36. {
  37. public:
  38.     FW_PMemorySink(Environment* ev, FW_OMemorySink* theMemorySink);
  39.     FW_PMemorySink(Environment* ev, void* buffer, long capacity, long length);
  40.         // Construct a memory sink given the buffer and the maximum capacity 
  41.         // of the buffer.  The length is the number of bytes which have been 
  42.         // written to the buffer.
  43.  
  44.     virtual ~FW_PMemorySink();
  45.  
  46. private:
  47.     FW_PMemorySink(const FW_PMemorySink&);
  48.     FW_PMemorySink& operator=(const FW_PMemorySink&);
  49. };
  50.  
  51. #endif
  52.